[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+----------+###############################################################
#+-| CURDIR() |-----------------------------------+###########################
#| +----------+ Returns the current DOS directory |###########################
#+------------------------------------------------+###########################
##############################################################################
##############################################################################
#+--| Summary |----------------+##############################################
#| #INCLUDE system.hdr |##############################################
#+-----------------------------+##############################################
##############################################################################
##############################################################################
#+--| Syntax |----------------------------+###################################
#| FUNCTION CHAR curdir PROTOTYPE |###################################
#| PARAMETERS VALUE UINT drive |###################################
#+----------------------------------------+###################################
##############################################################################
##############################################################################
##########+---| Description |--------------------------------------+##########
##########| The curdir() function returns the current directory as |##########
##########| defined by DOS. drive specifies the drive number ( 0 |##########
##########| for default, 1 for drive A:, etc.). |##########
##########| ------------------------------------------------------ |##########
##########| The returned directory name does not contain the drive |##########
##########| specification. The first character of the string is a |##########
##########| backslash. |##########
##########+--------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Get the current working directory on the |#########
#########| * default drive. |#########
#########| |#########
#########| ? curdir( 0 ) |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Print full path to filename |#########
#########| |#########
#########| ? chr( curdrive() + 'A' ) + ":"+ curdir() |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * Get the subdirectory name |#########
#########| |#########
#########| ? substr( curdir(0), rat("\",curdir(0))+1 ),255) |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
curdrive()
SET DEFAULT TO
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson